import store from '../store'
import {INCREMENTCOUNT,DECREMENTCOUNT} from '../constant/countConst'

export const incrementCount= (data = 1)=>{
  return ({
    type:INCREMENTCOUNT,
    data
  })
}

export const decrementCount= (data = 1)=>{
  return ({
    type:DECREMENTCOUNT,
    data
  })
}

export const waitincrementCount= (data = 1)=>{
  return ()=>{
    setTimeout(()=>{
      store.dispatch({
        type:'incrementCount',
        data
      })
    },2000)
  }
}